/**
 * IO操作
 */
use std::io::{stdin, stdout, Write};

pub fn write_words() {
    let mut in_words = String::new();
    println!("please input words: ");
    let result = stdin().read_line(&mut in_words).unwrap();
    println!("your input words: {}", in_words);

    println!("read words size: {}\n", result);

    for arg in std::env::args() {
        println!("input arg: {}", arg);
    }
}

pub fn output_words() {
    let out_words = "hello, welcome to learn rust!".as_bytes();
    let result = stdout().write(out_words).unwrap();
    println!("write words size: {}\n", result);
}